<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Order Management System</title>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
</head>
<body>

<div class="container my-2 " >
    <h1 class="text-center" style="color: #000000;">Order Management System</h1>

    <hr>
    <h2 style="text-align: center; color: #000000;">Save Orders</h2>
    <!--添加数据的页面--> <!--th:action 表单提交的url地址 @{} URL表达式 -->
    <form action="#" th:action="@{/saveOrders}" th:object="${orders}" method="POST">
        <!--订单ID的输入--> <!--th:field 用于指明要跳转的链接 *{}选择表达式，一般用于展示对象属性-->
        <input type="text" th:field="*{orderID}" placeholder="orderID" class="form-control mx-auto mb-4 col-4" style="border: 1px solid #000000">
        <!--订单时间的输入-->
        <input type="text" th:field="*{time}" placeholder="time" class="form-control mx-auto mb-4 col-4" style="border: 1px solid #000000">
        <!--订单收件人的输入-->
        <input type="text" th:field="*{consignee}" placeholder="consignee" class="form-control mx-auto mb-4 col-4" style="border: 1px solid #000000">
        <!--订单收件地址的输入-->
        <input type="text" th:field="*{addr}" placeholder="addr" class="form-control mx-auto mb-4 col-4" style="border: 1px solid #000000">
        <!--订单状态的输入-->
        <input type="text" th:field="*{status}" placeholder="status" class="form-control mx-auto mb-4 col-4" style="border: 1px solid #000000">

        <div style="display: flex; justify-content: center; align-items: center;">
            <button type="submit" class="btn btn-dark col-2">Save Orders</button>
        </div>
    </form>
    <hr>

    <div style="display: flex; color: #000000; justify-content: center; align-items: center;">
        <a th:href="@{/}" style="text-align: center;">Back to Orders List</a>
    </div>

</div>

</body>
</html>